<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="*|/"><xsl:apply-templates/></xsl:template>

<xsl:template match="text()|@*"><xsl:value-of select="."/></xsl:template>

<xsl:template match='nbsp' name='nbsp'>
<xsl:text disable-output-escaping='yes'>&amp;nbsp;</xsl:text>
</xsl:template>

<xsl:template name="lf2br">
 <xsl:param name="text"/>
 <xsl:choose>
   <xsl:when test="contains($text,'&#10;')">
     <xsl:value-of select="substring-before($text,'&#10;')"/>
     <br/>
     <xsl:call-template name="lf2br">
       <xsl:with-param name="text">
         <xsl:value-of select="substring-after($text,'&#10;')"/>
       </xsl:with-param>
     </xsl:call-template>
   </xsl:when>
   <xsl:otherwise>
     <xsl:value-of select="$text"/>
   </xsl:otherwise>
 </xsl:choose>
</xsl:template>


<xsl:template match="locale">
<xsl:if test="gallery">

<TABLE class="body" cellSpacing="0" cellPadding="0"  border="0">
	<TBODY>
		<TR> 
			<TD width="8"><IMG height="8" src="/imgs/pvts/box-tl.gif" width="8" border="0"/></TD>
			<TD width="100%" background="/imgs/pvts/box-t-back.gif"></TD>
			<TD width="8"><IMG height="8" src="/imgs/pvts/box-tr.gif" width="8" border="0"/></TD>
		</TR>
		<TR vAlign="top"> 
			<TD width="8" background="/imgs/pvts/box-l-back.gif"></TD>
			<TD width="100%" align="left" style="padding:0px;">

<div style="padding-bottom:10px;"><center><b><xsl:value-of select="@name"/></b><br/>gli ultimi eventi</center></div>
<xsl:for-each select="gallery">
	<div style="padding-bottom:25px; padding-top:10px;">
	<center>
		<A HREF="/gallery/galleryShow.aspx?gid={@gid}">
<xsl:for-each select="picture[position() &lt; 4]">
<div><img border="0" src="http://imgs.goparty.it/gallery/thumb/{@picname}"/></div>
</xsl:for-each>
		</A>
	</center>
	<div style="text-align:right; padding-top:5px;"><a class="b10b" href="/gallery/galleryShow.aspx?gid={@gid}"><xsl:value-of select="substring(@duedate,9,2)"/>/<xsl:value-of select="substring(@duedate,6,2)"/>/<xsl:value-of select="substring(@duedate,1,4)"/>,<br/> ...guarda le <b><u><xsl:value-of select="count(picture)"/> foto</u></b></a></div>
	</div>
</xsl:for-each>

			</TD>
			<TD width="8" background="/imgs/pvts/box-r.gif"><IMG height="10" src="/imgs/pvts/box-r.gif" width="8" border="0"/></TD>
		</TR>
		<TR> 
			<TD width="8"><IMG height="8" src="/imgs/pvts/box-bl.gif" width="8" border="0"/></TD>
			<TD width="100%" background="/imgs/pvts/box-b.gif"><IMG height="8" src="/imgs/pvts/box-b.gif" width="10" border="0"/></TD>
			<TD width="8"><IMG height="8" src="/imgs/pvts/box-br.gif" width="8" border="0"/></TD>
		</TR>
	</TBODY>
</TABLE>

</xsl:if>

</xsl:template>

</xsl:stylesheet>